<section class="content-header">
  <h1>{{title}}</h1>
  <ol class="breadcrumb">
    <li><a ui-sref="dashboard"><i class="fa fa-dashboard"></i>我的面板</a></li>
    <li><a class="active">列表</a></li>
  </ol>
</section>
<section class="content">
  <div class="box box-danger">
    <div class="box-header">
      <h3 class="box-title"></h3>
      <div class="box-tools">
      </div>
    </div>
    <div class="box-body table-responsive no-padding">
      <table class="table table-hover">
        <tbody>
          <tr>
            <th style="width: 10px">#</th>
            <th>主题</th>
            <th ng-if="search.type==1">编号</th>
            <th>状态</th>
            <th>发布时间</th>
            <th class="opt-col">操作</th>
          </tr>
          <tr ng-repeat="item in data.items">
            <td ng-bind="($index+1)"></td>
            <td ng-bind="item.title"></td>
            <td ng-if="item.type==1" ng-bind="item.code"></td>
            <td ng-bind="getStatus(item.status)"></td>
            <td ng-bind="format(item.date_created, 'YYYY-MM-DD HH:mm:ss')"></td>
            <td class="opt-col">
              <a class="fa fa-pencil green" ui-sref="notice_edit({id: {{item.id}}})" title="修改"></a>
              <a class="fa fa-undo red" ng-if="item.type==1 && item.status==1" ng-click="cancel(item)" title="撤销"></a>
              <a class="fa fa-reply" ng-if="item.type==1 && item.status==2" ng-click="release(item)" title="发布"></a>
              <a class="fa fa-trash-o red" ng-if="item.type==2" ng-click="delete(item)" title="删除"></a>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <div class="box-footer clearfix">
      <a class="btn btn-sm btn-info btn-flat pull-left" ng-click="add()">新增</a>
      <div pagination page-data="data.page" page-click="go(idx)"></div>
    </div>
  </div>
</section>
<div ui-view="modal"></div>
